package com.novellotus.iov.carvice.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Message;
import android.support.annotation.Nullable;

import com.novellotus.iov.carvice.R;
import com.novellotus.iov.carvice.utils.HandlerUtils;

/**
 * 引导页面
 */
public class WelcomeActivity extends Activity implements HandlerUtils.OnReceiveMessageListener {

    private HandlerUtils.HandlerHolder handlerHolder;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        init();
    }


    void init() {
        handlerHolder = new HandlerUtils.HandlerHolder(this);
        handlerHolder.sendEmptyMessageDelayed(1, 2000);
    }


    @Override
    public void handlerMessage(Message msg) {
        Intent intent = new Intent(WelcomeActivity.this, LoginActivity.class);
        startActivity(intent);
        finish();
    }
}
